import React from "react";
import PropTypes from "prop-types";

function App(props) {
  console.log(props);
  return <div>Hello App</div>;
}

// App.propTypes = {} 做props类型校验
App.propTypes = {
  name: PropTypes.string,
};

/**
 * 组件 props 的默认值定义，是通过 组件名.defaultProps = {} 才定义的
 */
App.defaultProps = {
  name: "张三",
};

export default App;
